package com.luckyframe.project.jmeter.jmeterNode.domain;

import com.luckyframe.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 性能测试分布式节点表 jmeter_node
 * 
 * @author lancelot
 * @date 2020-09-22
 */
public class JmeterNode extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/**  */
	private Long id;
	/** 子节点名称 */
	private String nodeName;
	/** 节点端口 */
	private Integer nodePort;
	/** ip地址 */
	private String ip;
	/** mac地址 */
	private String macAddr;
	/** Jmeter链接端口号 */
	private Integer jmeterPort;
	/** 节点机用户名 */
	private String userName;
	/** 节点机密码 */
	private String passwd;
	/** 最大并发数 -1表示未填写 */
	private Integer maxConcurrency;
	/** cpu -1表示未填写 */
	private Integer cpu;
	/** 内存 单位g -1表示未填写 */
	private Integer memory;
	/** 磁盘 单位g -1表示未填写  */
	private Integer disk;
	/** io -1表示未填写 */
	private Integer io;
	/** linux | windows */
	private String os;
	/** 子节点的Jmeter路径 */
	private String homeDir;
	/** 状态  0：禁用   1：正常 */
	private Integer status;
	/** slave节点机的权重，取值在1-99999，slave的权重可以大于或者小于master */
	private Integer weight;
	/** 创建时间 */
	private Date addTime;
	/** 提交用户id */
	private String addBy;
	/** 修改时间 */
	private Date updateTime;
	/** 修改用户id */
	private String updateBy;

	public void setId(Long id) 
	{
		this.id = id;
	}

	public Long getId() 
	{
		return id;
	}
	public void setNodeName(String nodeName) 
	{
		this.nodeName = nodeName;
	}

	public String getNodeName() 
	{
		return nodeName;
	}
	public void setNodePort(Integer nodePort) 
	{
		this.nodePort = nodePort;
	}

	public Integer getNodePort() 
	{
		return nodePort;
	}
	public void setIp(String ip) 
	{
		this.ip = ip;
	}

	public String getIp() 
	{
		return ip;
	}
	public void setMacAddr(String macAddr) 
	{
		this.macAddr = macAddr;
	}

	public String getMacAddr() 
	{
		return macAddr;
	}
	public void setJmeterPort(Integer jmeterPort) 
	{
		this.jmeterPort = jmeterPort;
	}

	public Integer getJmeterPort() 
	{
		return jmeterPort;
	}
	public void setUserName(String userName) 
	{
		this.userName = userName;
	}

	public String getUserName() 
	{
		return userName;
	}
	public void setPasswd(String passwd) 
	{
		this.passwd = passwd;
	}

	public String getPasswd() 
	{
		return passwd;
	}
	public void setMaxConcurrency(Integer maxConcurrency) 
	{
		this.maxConcurrency = maxConcurrency;
	}

	public Integer getMaxConcurrency() 
	{
		return maxConcurrency;
	}
	public void setCpu(Integer cpu) 
	{
		this.cpu = cpu;
	}

	public Integer getCpu() 
	{
		return cpu;
	}
	public void setMemory(Integer memory) 
	{
		this.memory = memory;
	}

	public Integer getMemory() 
	{
		return memory;
	}
	public void setDisk(Integer disk) 
	{
		this.disk = disk;
	}

	public Integer getDisk() 
	{
		return disk;
	}
	public void setIo(Integer io) 
	{
		this.io = io;
	}

	public Integer getIo() 
	{
		return io;
	}
	public void setOs(String os) 
	{
		this.os = os;
	}

	public String getOs() 
	{
		return os;
	}
	public void setHomeDir(String homeDir) 
	{
		this.homeDir = homeDir;
	}

	public String getHomeDir() 
	{
		return homeDir;
	}
	public void setStatus(Integer status) 
	{
		this.status = status;
	}

	public Integer getStatus() 
	{
		return status;
	}
	public void setWeight(Integer weight) 
	{
		this.weight = weight;
	}

	public Integer getWeight() 
	{
		return weight;
	}
	public void setAddTime(Date addTime) 
	{
		this.addTime = addTime;
	}

	public Date getAddTime() 
	{
		return addTime;
	}
	public void setAddBy(String addBy)
	{
		this.addBy = addBy;
	}

	public String getAddBy()
	{
		return addBy;
	}
	public void setUpdateTime(Date updateTime) 
	{
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() 
	{
		return updateTime;
	}
	public void setUpdateBy(String updateBy)
	{
		this.updateBy = updateBy;
	}

	public String getUpdateBy()
	{
		return updateBy;
	}

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("nodeName", getNodeName())
            .append("nodePort", getNodePort())
            .append("ip", getIp())
            .append("macAddr", getMacAddr())
            .append("jmeterPort", getJmeterPort())
            .append("userName", getUserName())
            .append("passwd", getPasswd())
            .append("maxConcurrency", getMaxConcurrency())
            .append("cpu", getCpu())
            .append("memory", getMemory())
            .append("disk", getDisk())
            .append("io", getIo())
            .append("os", getOs())
            .append("homeDir", getHomeDir())
            .append("status", getStatus())
            .append("weight", getWeight())
            .append("addTime", getAddTime())
            .append("addBy", getAddBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
